package com.ldy.gkrpc.server;

import com.ldy.gkrpc.common.utils.ReflectionUtils;
import com.ldy.gkrpc.proto.Request;

/**
 * @Description 服务调用
 * @Author songxulin
 * @Date 2020/4/13 20:21
 **/
public class ServiceInvoker {
    public Object invoker(ServiceInstance serviceInstance, Request request){
        return ReflectionUtils.invoke(serviceInstance.getTarget(),serviceInstance.getMethod(),request.getParamters());
    }
}
